Skip to main content

relative

Type

keyword

Summary

Used with the seek and move command to start the action at the current position.

Syntax

relative

Description

Use the relative keyword with the read from file and write to file commands to move within a file, or with the move command to move a control relative to its current location.

When used with the seek command, the relative keyword indicates how far to move the current position. If the number is positive, the seek command moves the current position by the specified number of characters forward in the file. If the number is negative, the current position is moved backward in the file.

(The current position in a file is set by the most recent read from file, write to file, or seek command. If none of these commands has been used on the file since it was opened, the current position is zero. The next read from file or write to file command starts from the new current position.)

When used with the move command, the relative keyword indicates how many pixels to the right and down to move the control.

Examples

seek relative -20 in file "Input Date"
move image "Butterfly" relative 10,-10 - 10 pixels right and up

command: write to file, seek, move, read from file

function: localLoc, globalLoc

glossary: command, keyword, negative

keyword: characters, file, control

property: pixels

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?